<?php

class slot extends app_model {
  public $_key = 'id';
  public $_fields = array(
    'id' => array(
      'type' => 'INT(11)',
      'widget' => 'hidden'),
    'url' => array(
      'type' => 'VARCHAR(128)',
      'widget' => 'hidden'),
    'section' => array(
      'type' => 'VARCHAR(128)',
      'widget' => 'hidden'),
    'seq' => array(
      'type' => 'INT(4)',
      'widget' => 'hidden'),

    'title' => array(
      'type' => 'VARCHAR(128)',
      'title' => 'Titel'),
    'enabled' => array(
      'type' => 'CHAR(1)',
      'title' => 'aktiv',
      'widget' => array('select', array('0' => 'nein', 1 => 'ja'))),
    'date_from' => array(
      'type' => 'DATE',
      'title' => 'Anfangsdatum',
      'default' => 'JJJJ-MM-TT'),
    'date_to' => array(
      'type' => 'DATE',
      'title' => 'Enddatum',
      'default' => 'JJJJ-MM-TT'),
    'establishment' => array(
      'type' => 'VARCHAR(128)',
      'title' => 'Einrichtung'),
    'body' => array(
      'type' => 'TEXT',
      'title' => 'Beschreibung'),
  );
}
